Owen W. Taylor [Mon, 19 May 2014 23:26:41 +0000 (19:26 -0400)]
perf: fix bug in code to print out metrics
We don't normally hit the code in scripting.js to print metrics
because shell-perf-tool bypasses it, but there was a left-over
in the code that no longer works. Also add in the units to the
output.
Owen W. Taylor [Thu, 5 Jun 2014 19:00:01 +0000 (15:00 -0400)]
js/Makefile.am: Fix dependency generation with srcdir != builddir
If reusing an existing separate builddir, the generation of dependencies
for the JS resource file would fail because it couldn't find misc/config.js,
resulting in the resource file not being regenerated.
Listen to changes in connectivity, and ask our helper to authenticate
when needed.
We don't have a URL to connect to yet (we will have when
the new NM API lands), so we use the default of trying
www.gnome.org (which is also more reliable because we can
recognize when the login is done)
Add a small DBus-activated GtkApplication that embeds a WebKitWebView
and implements some minimal logic to see if the login succeeds.
It will try to connect to a custom NM-provided url (the portal login
page), if one exists, or to www.gnome.org in the normal case of
a portal doing redirect.
NetworkMenu: make sure menu icons are updated at the end of connectivity checks
Icons inside the menu are updated only for device state change,
but for the main device they also depend on connectivity (which
is a global property).
Add a public method to force an update of the icon, and call it
when connectivity changes.
WorkspacesView: separate setting the full and the actual geometry
They are different properties, they deserve different syncs.
Especially because a full allocation cycle sets both anyway, so
we should save some cycles this way.
workspace: avoid GObject overhead while computing the clone layout
We already have the width and height information cached in JS,
let's avoid going through gjs-gobject-clutter to retrieve them
again. As a plus, with normal properties the optimizer should
be able to generate better code.
background: fix typo updating images for animated background
We must remove the old image from the cache, not the new one.
This was causing a leak of old (and expensive) background
images, and was causing errors at the end of animations, trying
to destroy the animated background.
Wim Taymans [Wed, 11 Jun 2014 20:18:39 +0000 (22:18 +0200)]
shell-recorder: send EOS to the pipeline
Send EOS to the complete pipeline instead of only to our own source.
When there are multiple sources in the pipeline (for example when we also
record audio), the pipeline will send the EOS to all sources in order to
shut down the complete pipeline.
location: Update available accuracy on max accuracy changing
We translate 'On' to available accuracy level but if available accuracy
level later changes, we don't update available accuracy level accordingly
and hence limit the accuracy of apps.
E.g if available accuracy level is 'city' and geolocation is enabled,
the max accuracy level would be 'city' and apps can't get higher than
that. Now if user plugs in GPS, the available accuracy level will change
to 'exact' but without this patch max accuracy level will remain to be
'city' and apps will not be able to use the GPS.
The code currently tries to use Meta.KeyBindingFlags.REVERSED. Since
this constant is |'ed with Meta.KeyBindingFlags.REVERSES, gjs silently
ignores the unknown flag.
Florian Müllner [Mon, 16 Jun 2014 08:24:39 +0000 (10:24 +0200)]
appDisplay: Fix app folder "modal-ness"
Commit 5d00c1a5ee moved app folder popups to GrabHelper - for some
reason, the line that ensures the current behavior of only considering
events inside the app picker to dismiss popups got lost ...
Some entries have untranslatable descriptions/summaries. This means that
when running dconf-editor, some entries will get a translated descriptions,
and a few will not.
Florian Müllner [Wed, 11 Jun 2014 11:13:12 +0000 (13:13 +0200)]
appDisplay: Use GrabHelper for folder popups
As clicks outside the app picker should still be handled normally
while clicks inside should dismiss the popup, we cannot make full
use of GrabHelper. However using it at least for focus handling
fixes some minor details we are getting wrong, for instance not
restoring the previous focus after dismissing a folder popup.
Florian Müllner [Thu, 5 Jun 2014 16:09:47 +0000 (18:09 +0200)]
main: Move pref overrides back into C
Commit 6c2f3d1d178a65d moved pref overrides into JS to implement
session mode specific overrides in a clean and generic way.
However that approach comes with a cost - doing the overrides only
after having handled over control to JS means that the core will
be initialized with the non-overridden settings before changing
to the correct values. In the best case this is unnecessary work,
but it can in fact have a worse effect: when initializing workspaces,
we will restore the previous number of workspaces when using
dynamic-workspaces and reset to the configured number otherwise.
As the non-overridden default for dynamic-workspaces is FALSE, we
can easily end up moving the user's windows to the "wrong" workspace.
Now GSettings is expected to grow support for session specific defaults,
which will render our entire override system obsolete (yay!). Given
that, it seems acceptable to use a less generic (and uglier) approach
in the meanwhile, in order to fix aforementioned problems. So move
overrides back before core initialization and just hardcode the
session-mode => override-schema relation.
Florian Müllner [Sat, 31 May 2014 03:19:20 +0000 (05:19 +0200)]
windowMenu: Do a better job with faking the source actor
The 0x0 dummyCursor works well when the menu pops up directly underneath
the pointer (e.g. when triggered by right-clicking the titlebar) or by
keyboard, but not when triggered by the menu button - the menu does not
point to the center of the button's bottom edge, and unless the user
keeps holding the mouse button while moving into the menu, the menu will
be dismissed immediately on button release.
Address these issues by using the button geometry to overlay the window
button with an appropriately sized actor that acts as a proper sourceActor,
to make the window menu behavior consistent with other shell menus.
Florian Müllner [Mon, 2 Jun 2014 19:47:24 +0000 (21:47 +0200)]
windowMenu: Implement new show_menu_for_rect() hook
Having the full geometry of the menu's source button (if any) will
allow us to address several misbehaviors of window menus, so use
that instead of show_menu().
messageTray: Clear the pointer left timeout when showing a notification
When the pointer leaves the notification area, we queue a timeout to
hide the notification after a little while. If the user is hovering over
a notification and clicks the X button to close the notification, we will
destroy the notification, which causes a "pointer left" event on the
notification area. This queues a timeout which erroneously fires after
the next notification in the queue shows up.
The code and state machine are too complex to properly make sure this
timeout doesn't fire when there is no notification up next, so instead
just clear it when showing a notification to make sure that any
previously queued timeout doesn't apply to us.
Antoine Jacoutot [Fri, 30 May 2014 09:26:39 +0000 (11:26 +0200)]
openbsd: fix shell_global_reexec_self()
Rework the way we re-exec the shell on OpenBSD so that it does not only
work the first time it is re-exec'd.
Plug a small leak in the __linux__ case while here.
We don't make use of any functionality StTable provides over
ClutterTableLayout, so port all users to the Clutter layout
in order to remove our own copy of the code.
We don't make use of any functionality StTable provides over
ClutterTableLayout, so port all users to the Clutter layout
in order to remove our own copy of the code.
telepathyClient: Only use 12-hour format when supported by the locale
It is a bit odd to request AM/PM format when the locale selected
by LC_TIME lacks the concept. We ignore the format setting in that
case elsewhere and assume 24-hour format, let's do the same for
chat timestamps for consistency.
Florian Müllner [Fri, 23 May 2014 16:38:23 +0000 (18:38 +0200)]
windowMenu: Only add workspace actions when enabled by session mode
When workspaces are disabled by the session mode, all workspace
related actions don't make sense. Worse, the "Move to Workspace ..."
actions allow sending windows into a nirvana with no means to
get them back.
Florian Müllner [Fri, 23 May 2014 15:14:20 +0000 (17:14 +0200)]
viewSelector: Don't re-navigate into the active page
Starting keynav into the active page is handled from a key-press
handler on the stage, however we should not "start" keynav when
we are already navigating elsewhere - the latter can happen when
keynav fails (for instance because the focus is trapped inside an
open app folder or at the end of the dash), and the event bubbles
up to the stage. So make sure to only handle the event to actually
start keynav, to not interfere with the normal navigation handling.
Thanks to Carlos Soriano <carlos.soriano89@gmail.com> for the
debugging footwork.
Florian Müllner [Sun, 25 May 2014 14:46:09 +0000 (16:46 +0200)]
theme: Bring fallback app-menu style closer to GTK+
The fallback app-menu in GTK+'s client side decorations obviously
uses the GTK+ theme rather than the shell one; update the style
of our own fallback app-menu to resemble that style.
Florian Müllner [Sat, 24 May 2014 01:32:44 +0000 (03:32 +0200)]
Support (fallback) app menu in SSD
We now allow "appmenu" in the button layout to make synchronizing it
with GTK+'s client-side decorations easier, but as some people tweak
their settings to get in-window app menus even when using the shell,
actually pop up the app menu when the button is activated.
Florian Müllner [Sun, 25 May 2014 14:38:05 +0000 (16:38 +0200)]
popupMenu: Hide separator label when not in use
The optional label support introduced in commit af063dc2f2ec broke
the centering of separators, as the label still adds additional
spacing even when empty.
Properly hide the label actor in that case to fix the alignment.